import Layout from '@/views/Layout/Layout.vue'

export const routerMap = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: '/home/home_index'
  },
  {
    path: '/home',
    name: 'home',
    component: Layout,
    redirect: '/home/home_index',
    meta: { title: 'home' },
    children: [
      {
        path: 'home_index',
        name: 'home_index',
        meta: { title: '首页' },
        component: () => import('@/views/Home/Home.vue')
      }
    ]

  },
  {
    path: '/testA',
    name: 'testA',
    component: Layout,
    meta: { title: 'A' },
    children: [
      {
        path: 'testA_1',
        name: 'testA_1',
        meta: { title: 'A1' },
        component: () => import('@/views/TestA/TestA.vue')
      }
    ]
  },
  {
    path: '/testB',
    name: 'testB',
    component: Layout,
    meta: { title: 'B' },
    children: [
      {
        path: 'testB_1',
        name: 'testB_1',
        meta: { title: 'B1' },
        component: () => import('@/views/TestB/TestB-1.vue')
      },
      {
        path: 'testB_2',
        name: 'testB_2',
        meta: { title: 'B2' },
        component: () => import('@/views/TestB/TestB-2.vue')
      }
    ]
  }
]

export const routes = [
  {
    path: '/login',
    name: 'login',
    hidden: true,
    component: () => import('@/views/Login/Login.vue')
  },
  {
    path: '*',
    hidden: true,
    component: () => import('@/views/ErrorPage/Error_404.vue')
  }
]
